import request from '@/config/axios'

export interface LegalAdviceClueQaVO {
        id: number
        userId: number
        contactUserMobile: string
        contactUserRealName: string
        areaCode: string
        qaType: number
        qaDetailType: number
        qaMode: number
        qaBgContentOmit: string
        nickName: string
        mobile: string
        qaTypeTitle: string
        qaDetailTypeTitle: string
        provinceName: string
        areaName: string
        qaContent: string
        adClueId: number
}

// 查询法律咨询线索对话列表
export const getLegalAdviceClueQaPage = async (params) => {
    return await request.get({url: `/ad/legal-advice-clue-qa/page`, params})
}

// 查询法律咨询线索对话详情
export const getLegalAdviceClueQa = async (id: number) => {
    return await request.get({url: `/ad/legal-advice-clue-qa/get?id=` + id})
}

// 新增法律咨询线索对话
export const createLegalAdviceClueQa = async (data: LegalAdviceClueQaVO) => {
    return await request.post({url: `/ad/legal-advice-clue-qa/create`, data})
}

// 修改法律咨询线索对话
export const updateLegalAdviceClueQa = async (data: LegalAdviceClueQaVO) => {
    return await request.put({url: `/ad/legal-advice-clue-qa/update`, data})
}

// 删除法律咨询线索对话
export const deleteLegalAdviceClueQa = async (id: number) => {
    return await request.delete({url: `/ad/legal-advice-clue-qa/delete?id=` + id})
}

// 导出法律咨询线索对话 Excel
export const exportLegalAdviceClueQa = async (params) => {
    return await request.download({url: `/ad/legal-advice-clue-qa/export-excel`, params})
}